# 公司：安徽银杰
# 作者：李伟

from selenium import webdriver
import time

from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get("http://erp.ghaomc.com/")
driver.maximize_window()
time.sleep(2)
""" 
# ①基础操作
# driver.get("https://baidu.com/")
# time.sleep(2)
#
# driver.back()
# time.sleep(2)
# driver.forward()
# driver.refresh()
# time.sleep(2)
# driver.quit()
print(driver.page_source)
print(driver.title)
print(driver.current_url)
"""

# ②单一元素定位
# 定位登录
driver.find_element(By.XPATH,'//input[@placeholder="手机号/邮箱"]').send_keys("15705692090")
time.sleep(2)
driver.find_element(By.XPATH,'//div[contains(text(),"手机号/邮箱")]').send_keys("2090")
driver.find_element(By.XPATH,'//span[text()="记住账号"]').click()
driver.find_element(By.XPATH,"//div[@id='pane-first']//button/span[text()='登录']").click()
